<?php
include("../model/configuration.php");
include("../model/function.php");
$username = $_GET['username'];
//echo $username;
$query=dbQuery("select * from pengguna where username='$username'");
$data=dbAssoc($query);
?>
<form name="user_edit" id="user_edit" action="user_update.php?username=<?php print $data['username'];?>" method="post">
<table width="98%" border="0" cellspacing="0" cellpadding="5">
   <tr>
    <td width="250" class="form_insert">Username</td>
    <td width="395"><input type="text" name="username"  id="username" size="50" value="<?php echo $data['username']; ?>" readonly="readonly"/></td>
  </tr>
  <tr>
    <td width="250" class="form_insert" >Password</td>
    <td width="395"><input type="password" name="password"  id="password" size="50" class="form" value="<?php echo $data['password']; ?>" /></td>
  </tr>
  <tr>
    <td width="250" class="form_insert" >Level</td>
    <td width="395"><input type="text" name="level"  id="level" size="50" class="form" value="<?php echo $data['id_level']; ?>" readonly="readonly"  /></td>
  </tr>
  <tr>
	<td><select name="level">
    <option value="0">--Pilih Level Baru--</option>
	<?php
	$query=dbQuery("select * from level order by id_level");
		while($data=dbAssoc($query)){
		echo"<option value='$data1[id_level]'>$data[nama_level]</option>";
		}
	?>
	</select></td>
  </tr>
  <tr>
    <td width="250" class="form_insert" >Nama Lengkap</td>
    <td width="395"><input type="text" name="nama_pengguna"  id="nama_pengguna" size="50" class="form" value="<?php echo $data['nama_pengguna']; ?>" /></td>
  </tr>
  <tr>
    <td width="250" class="form_insert" >Alamat</td>
    <td width="395"><input type="text" name="alamat_pengguna"  id="alamat_pengguna" size="50" class="form" value="<?php echo $data['alamat_pengguna']; ?>" /></td>
  </tr>
  <tr>
    <td width="250" class="form_insert" >Email</td>
    <td width="395"><input type="text" name="email_pengguna"  id="email_pengguna" size="50" class="form" value="<?php echo $data['email_pengguna']; ?>" /></td>
  </tr>
  <tr>
    <td width="250" class="form_insert" >Nomor Telepon</td>
    <td width="395"><input type="text" name="telp_pengguna"  id="telp_pengguna" size="50" class="form" value="<?php echo $data['telp_pengguna']; ?>" /></td>
  </tr>
  <tr>
    <td width="250" class="form_insert" >Jenis Identitas</td>
    <td width="395"><input type="text" name="id_jenis_id"  id="id_jenis_id" size="50" class="form" value="<?php echo $data['id_jenis_id']; ?>" /></td>
  </tr>
  <tr>
    <td width="250" class="form_insert" >Nomor Identitas</td>
    <td width="395"><input type="text" name="no_identitas_pengguna"  id="no_identitas_pengguna" size="50" class="form" value="<?php echo $data['no_identitas_pengguna']; ?>" /></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td><input type="submit" name="user_edit" value="SIMPAN"></td>
  </tr>
